package com.example.spinning.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.spinning.bean.QualityReport;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface QualityReportMapper extends BaseMapper<QualityReport> {

    //添加一条新的原料记录
    int addNewQualityReport(QualityReport qualityReport);

    //根据batch_no删除原料记录
    int deleteQualityReportById(@Param("ids") Long[] ids);

    //根据id查记录
    QualityReport getQualityReportById(Long id);

    //根据客户查记录
    List<QualityReport> getQualityReportByClient(@Param("client") String client);

    //根据品名查记录
    List<QualityReport> getQualityReportByName(@Param("name") String name);
    //查指定品名的数量
    int getNameCount(@Param("name") String name);

    //按日期查找

    //按品名和日期查找

    //修改
    int updateQualityReportById(QualityReport qualityReport);
    //查所有
    List<QualityReport> getAll(@Param("start") Integer start,@Param("count") Integer count);
    //查总数量
    int getAllCount();

}




